//
//  DPPictureSelectorHeaderView.m
//  DailyPhoto
//
//  Created by 黄凯展 on 16/7/25.
//  Copyright © 2016年 ShengCheng. All rights reserved.
//

#import "DPPictureSelectorHeaderView.h"
#import "SelectPhotoConfig.h"
#import "Masonry.h"

@interface DPPictureSelectorHeaderView ()
/***  内容*/
@property (nonatomic, weak) UILabel *contentLabel;
@end

@implementation DPPictureSelectorHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self setupSubviews];
    }
    return self;
}

- (void)setupSubviews
{
    UILabel *contentLabel = [[UILabel alloc] init];
    contentLabel.textColor = [UIColor colorWithRed:80.0/255 green:60.0/255 blue:40.0/255 alpha:1.0];
    contentLabel.font = [UIFont systemFontOfSize:15];
    [self addSubview:contentLabel];
    self.contentLabel = contentLabel;
    [contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.height.top.equalTo(self);
    }];
}

- (void)setDate:(NSString *)date
{
    _date = date;
    if (date.length) {
        self.contentLabel.text = date;
    }
}
@end
